package com.tyl.xtk.beans.po;

import com.baomidou.mybatisplus.annotation.TableName;
import com.tyl.xtk.config.validation.groups.Insert;
import com.tyl.xtk.config.validation.groups.Update;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

/**
 * create by tyl at 2025/8/27
 */
@Data
@TableName("role_info")
public class Role {

    @NotNull(groups = Update.class, message = "角色名不能为空")
    private Long id;

    @NotNull(groups = Insert.class, message = "角色名不能为空")
    @Length(min = 2, max = 30, message = "角色名长度应为2-30")
    private String name;

    @Length(max = 100, message = "角色描述长度应为0-100")
    private String remark;
}